package zsc.ruanc.practicaltraining.exception;


import lombok.AllArgsConstructor;
import lombok.Getter;
import zsc.ruanc.practicaltraining.model.result.ResultCode;

@AllArgsConstructor
@Getter
public class ApiException extends RuntimeException{

    private int code;

    // 返回给用户的错误信息
    private String info;

    // 记录错误的位置
    private String position;

    public ApiException(int code) {
        this.code = code;
    }

    public ApiException(int code, String info) {
        super(info);
        this.code = code;
        this.info = info;
    }


}
